package ${configure.entityPackage};

<#if importSet?? && importSet?size gt 0>
<#list importSet as imp>
import ${imp};
</#list></#if>

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import frame.base.BaseTo;

/**
 * 对应表：${configure.tableName}
 * <br>
 * @author ${configure.author}
 * @since ${configure.since}
 */
@Table(name = "${configure.tableName}")
public class ${configure.entityName} extends BaseTo<${id.fieldType}> {
	@Id
	<#if id.fieldType=="Integer">
    @GeneratedValue(generator = "JDBC")
	</#if>
    /** ${(id.remarks)!'id'}*/
    private ${id.fieldType} ${id.fieldName};

	<#list fieldList as c2f>
	/** ${(c2f.remarks)!'TODO 数据库无注释,请检查数据库设计'}*/
	private ${c2f.fieldType} ${c2f.fieldName};
  	</#list>

  	public ${configure.entityName}() {
	}
	public ${configure.entityName}(${id.fieldType} ${id.fieldName}) {
		this.${id.fieldName} = ${id.fieldName};
	}
  	public ${id.fieldType} getId() {
        return ${id.fieldName};
    }
    public void setId(${id.fieldType} ${id.fieldName}) {
        this.${id.fieldName} = ${id.fieldName};
    }
	<#list fieldList as c2f>
	public ${c2f.fieldType} get${c2f.fieldName ?cap_first}() {
		return ${c2f.fieldName};
	}
	public ${configure.entityName} set${c2f.fieldName ?cap_first}(${c2f.fieldType} ${c2f.fieldName}) {
		this.${c2f.fieldName} = ${c2f.fieldName};
		return this;
	}
  	</#list>

}
